from django.forms import model_to_dict


def django_model_to_dict(instance, fields=None, exclude=None, model_newly: list = None):
    data = model_to_dict(instance, fields, exclude)
    if model_newly is not None:
        for i in model_newly:
            data[i] = instance.__getattribute__(i)
    return data
